home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / casm / au116-as.exe / UTIL / FINDEXT.CPP < prev    next >
C/C++ Source or Header  |  1994-06-05  |  434b  |  25 lines

  1. #include "..\au.hpp"
  2.  
  3. /*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*/
  4. BYTE find_ext(AU *au, char *ext)
  5. {
  6.     char temp[5];
  7.  
  8.     if (ext[0] == '.')
  9.         strcpy(temp, ext+1);
  10.     else
  11.         strcpy(temp, ext);
  12.  
  13.     for (int i=0; i<MAX_TYPES; i++)
  14.     {
  15.         if (stricmp(temp, au->package[i].extension) == 0)
  16.         {
  17.             return i;
  18.         }
  19.     }
  20.     au_printf_error(au, "Unknown extension %s", temp);
  21.     exit(1);
  22.     return -1;
  23. }
  24.  
  25.